$(document).ready(function(){
	//修改密码
	$("#updatePass").click(function(){
		location.href = './userUpdatePass';
	});
	
	//用户退出
	$("#userExit").click(function(){
		$.ajax({
			url:"logout",
			type:"POST",
			dataType:"json",
			success:function(data){
				if(data.ok == 'ok'){
					//if(!!document.referrer && document.referrer.indexOf("register")<0){
					//	location.href = document.referrer;
					//}else{
						location.href = "../category";	
					//}
				}else{
					alert(data.msg);
				}
			}
		});
	});
});